home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98c.txt / 000047_icon-group-sender _Thu Sep 24 12:40:55 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id MAA05492
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Thu, 24 Sep 1998 12:40:55 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA13283; Thu, 24 Sep 1998 12:40:25 -0700
  7. To: icon-group@optima.CS.Arizona.EDU
  8. Date: 24 Sep 1998 09:19:02 -0700
  9. From: gmt@optima.CS.Arizona.EDU (Gregg Townsend)
  10. Message-Id: <6udrdm$p2g@hawk.CS.Arizona.EDU>
  11. Organization: University of Arizona CS Department, Tucson AZ
  12. Sender: icon-group-request@optima.CS.Arizona.EDU
  13. References: <6ucfk5$fh7@news.southeast.net>
  14. Subject: Re: Possible to return a record from a loadable C func?
  15. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  16. Status: RO
  17.  
  18. Steve Hite <sch@southeast.net> wrote:
  19.  
  20. > I've been looking at the cfuncs directory in Icon 9.3 for examples of how to
  21. > create external C functions which can be dynamically loaded by the
  22. > interpreter.  I would like to construct a C function and have it return an
  23. > Icon record type.  Is this possible?
  24.  
  25. You can probably build a record if you can get the Icon caller to pass in
  26. a record constructor.  There's no predefined macro for building records,
  27. as you've noticed, so it will take some digging in the Icon runtime system
  28. source code to figure out what to do.
  29.  
  30. Creating a *new* record type that doesn't already exist is not feasible;
  31. all record types must be known at link time, where they affect tables and
  32. operands in the generated icode.
  33.  
  34.    ---------------------------------------------------------------------------
  35.    Gregg Townsend              Gould-Simpson Building   gmt@cs.arizona.edu
  36.    Staff Scientist             1040 E. 4th St.          32 13 45N  110 57 16W
  37.    Dept. of Computer Science   PO Box 210077            tel: +1 520 621 4325
  38.    The University of Arizona   Tucson, AZ  85721-0077   fax: +1 520 621 4246
  39.